package com.guocheng.modules.meet.service;

import com.guocheng.base.BaseService;
import com.guocheng.modules.emp.model.po.Emp;
import com.guocheng.modules.meet.mapper.MeetEmpMapper;
import com.guocheng.modules.meet.model.po.MeetEmp;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;
import java.util.*;

@Service
public class MeetEmpService extends BaseService<MeetEmpMapper, MeetEmp> {

    /**
     * 添加签到人员
     * @param meetId
     * @param emps
     * @return
     */
    public boolean inserts(Integer meetId, List<Emp> emps) {
        if (emps==null) return false;
        int i= baseDao.inserts(meetId,emps);
        return i>=0;
    }

    /**
     * 根据会议ids删除签到人员
     * @param ids
     * @return
     */
    @Transactional(readOnly = false)
    public int deleteByMeets(Collection<? extends Serializable> ids){
        return baseDao.deleteByMeets(ids);
    }

}
